#include "Font.h"

Font::Font( const std::string& name, int base, int height, std::vector<int>& widths ) : m_Name(name.c_str()), m_Base(base), m_Height(height), m_CharWidths(widths)
{
}
const int Font::Base()
{
	return m_Base;
}
const HashedString& Font::Name()
{
	return m_Name;
}
const int Font::Height()
{
	return m_Height;
}
const unsigned int Font::CharWidths( unsigned int character )
{
	return m_CharWidths[character];
}
const unsigned int Font::LineWidths( std::string& string )
{
	unsigned int total = 0;
	for(std::string::iterator it = string.begin(); it != string.end(); ++it)
	{
		total += m_CharWidths[*it];
	}
	return total;
}